#ifndef __HALALGSM4_H__ 
#define __HALALGSM4_H__ 

	#define HALALGSM4_MODE_ECB	0x00000401L 
	#define HALALGSM4_MODE_CBC	0x00000402L 
	#define HALALGSM4_MODE_CFB	0x00000404L 
	#define HALALGSM4_MODE_OFB	0x00000408L 

	extern UINT32 HalAlgSM4_Init(UINT8 Key[], UINT8 IV[]); 
	extern UINT32 HalAlgSM4_Encrypt_Update(UINT32 Mode, UINT8 *pInBuf, UINT16 nSize, UINT8 *pOutBuf); 
	extern UINT32 HalAlgSM4_Decrypt_Update(UINT32 Mode, UINT8 *pInBuf, UINT16 nSize, UINT8 *pOutBuf); 
	extern UINT32 HalAlgSM4_Final(void); 

	extern UINT32 HalAlgSM4Mac_Init(UINT8 IV[], UINT8 Key[]);
	extern UINT32 HalAlgSM4Mac_Update(UINT8 *pBuf, UINT16 nSize); 
	extern UINT32 HalAlgSM4Mac_Final(UINT8 *pMac);

#endif
